<script>
	
	function cancel(){
		window.close();
	}
	function save(){
		$("#frmTahunAjaran").submit();		
	}
</script>
<?php
	//echo $op;
	//print_r($op);
?>

<div style="border-bottom:2px solid #000;padding-bottom:5px;margin-bottom:20px">
<?php 
	$this->widget('application.components.widgets.ActionBar', 
		array("menuAlign" => "right", 
			'items' => array(
				array(
					'id' => "btnRefresh",
					'title' => "Simpan",
					'icon' => "images/action/Actions-document-save-all-icon.png",
					'callback'=>"save"
				),					
				array(
					'id' => "btnCancel",
					'title' => "Batal",
					'icon' => "images/action/Actions-dialog-cancel-icon.png",
					'callback'=>"cancel"
				),
			)
		)
	);
?>
</div>

<script>
	
	
</script>

<form id="frmTahunAjaran" action="index.php?r=akademik/master/jam_pelajaran/edit" method="POST">	
	<input type="hidden" name="op" value="<?php echo $op ?>" readonly/>
	<input type="hidden" name="id" id="id" value="<?php echo $id ?>" readonly/>
	<input type="hidden" name="name" id="name" value="<?php echo $name ?>" />    
	<div>
		<input type="hidden" id="department_id" name="department_id" value="<?php echo $department_id ?>"/>
		<label class="form mandatory" style="width:100px"> <?php echo Yii::t("label","Departemen") ?></label> 		
		<?php
			$rsDep = MDepartment::model()->findAll(array("condition"=>"is_active = TRUE","order"=>"id"));
			$arrOptions=array();
			foreach($rsDep as $rw){
				$selected = $department_id == $rw->id ? true : false;
				$arrOptions[] = array("label"=>$rw->name,"value"=>$rw->id,"selected"=>$selected);
			}
			$this->widget('application.components.widgets.SelectField', 
				array("name"=>"department_id",
					"value"=>"",
					"htmlOptions"=>"disabled",
					"label"=>array(
						"value"=>"",
						"htmlOptions"=>""
					),
					"options"=>$arrOptions,
				)
			);
			
		?>		
	</div>
	<div>
	<?php
		$this->widget('application.components.widgets.TextField', 
			array("name"=>"time_start",
				"value"=>$time_start,
				"htmlOptions"=>"size='20'",
				"label"=>array(
					"value"=>Yii::t("label","Jam Mulai"),
					"htmlOptions"=>"class='form' style='width:100px'"
				)
			)
		);
	?>
	</div>
	<div>
	<?php
		$this->widget('application.components.widgets.TextField', 
			array("name"=>"time_end",
				"value"=>$time_end,
				"htmlOptions"=>"size='20'",
				"label"=>array(
					"value"=>Yii::t("label","Jam Selesai"),
					"htmlOptions"=>"class='form' style='width:100px'"
				)
			)
		);
	?>
	</div>   
	<div><label class="form" style="width:100px"><?php echo Yii::t("label","status") ?></label><input type="checkbox"  id="is_active" name="is_active" <?php echo $is_active == true?"checked":"" ?> /></div>
	
</form>

